<template>
  <div class="ad-banner">
    <div class="banner-main">
      <div class="banner-placeholder">
        <h3>宠物用品大促销</h3>
        <p>全场满299减30，新用户首单立减50</p>
      </div>
    </div>
    <div class="banner-side">
      <div class="side-item" v-for="item in sideItems" :key="item.id">
        <h3>{{ item.title }}</h3>
        <p>{{ item.desc }}</p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "AdBanner",
  data() {
    return {
      sideItems: [
        { id: 1, title: "宠物食品", desc: "进口粮8折起" },
        { id: 2, title: "宠物医疗", desc: "疫苗套餐优惠" },
        { id: 3, title: "新人礼包", desc: "注册领100元券" },
      ],
    };
  },
};
</script>

<style scoped>
.ad-banner {
  display: flex;
  margin-bottom: 20px;
  height: 200px;
}
.banner-main {
  flex: 3;
  background-color: #f0f9eb;
  margin-right: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 8px;
}
.banner-placeholder {
  text-align: center;
  color: #409eff;
}
.banner-placeholder h3 {
  font-size: 24px;
  margin-bottom: 10px;
}
.banner-side {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.side-item {
  flex: 1;
  background-color: #f5f5f5;
  margin-bottom: 5px;
  padding: 10px;
  border-radius: 8px;
}
.side-item:last-child {
  margin-bottom: 0;
}
.side-item h3 {
  margin: 0 0 5px 0;
  color: #67c23a;
}
.side-item p {
  margin: 0;
  font-size: 12px;
  color: #666;
}
</style>
